package com.mz.ieann.doplayer.audio.core.listener

import android.content.res.AssetFileDescriptor
import android.view.ViewGroup
import com.mz.ieann.doplayer.audio.listener.ProgressListener
import com.mz.ieann.doplayer.audio.widget.YouVisualizerView

/**
 * <p>------------------------------------------------------
 * <p>Copyright (C) 2020 wasu company, All rights reserved.
 * <p>------------------------------------------------------
 * <p>
 * <p>
 *
 * @author Created by zhangmz
 * @date on 2023/5/11
 */
interface IAudioPlayer {

    /**
     * 创建播放器
     */
    fun create(assetFile: AssetFileDescriptor): IAudioPlayer

    /**
     * 开始播放
     */
    fun prepare(view: ViewGroup)

    /**
     * 修改进度
     */
    fun updateProgress(progress: Int)

    /**
     * 回调播放进度
     */
    fun addListener(listener: ProgressListener?): IAudioPlayer

    /**
     * 频谱波形图
     */
    fun addVisualizer(visualizerView: YouVisualizerView?): IAudioPlayer



    fun isPlaying(): Boolean

    fun seek(offset: Int)

    fun resume()

    fun pause()

    fun stop()

    fun release()


}